package com.zhs.gccs.activity.gccs;

import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;

import androidx.annotation.Nullable;

import com.gyf.immersionbar.ImmersionBar;
import com.zhs.gccs.R;
import com.zhs.gccs.base.BaseActivity;
import com.zhs.gccs.model.GccsProjectSsgh;
import com.zhs.gccs.utils.OnNoDoubleClickListener;
import com.zhs.gccs.vo.ApplyGccsTask;

import butterknife.BindView;
import butterknife.ButterKnife;

public class GccsTaskMenuActivity extends BaseActivity {
    public static String intent_data ="data";
    ApplyGccsTask applyGccsTask;
    GccsProjectSsgh gccsProjectSsgh;
    @BindView(R.id.iv_back)
    View iv_back;
    @BindView(R.id.ll_root)
    View ll_root;
    @BindView(R.id.ll_gccs)
    View ll_gccs;
    @BindView(R.id.ll_xmsj)
    View ll_xmsj;
    @BindView(R.id.ll_zjbf)
    View ll_zjbf;
    @BindView(R.id.ll_ssgh)
    View ll_ssgh;
    //////////////////////////
    public static void start(Context context, ApplyGccsTask bean){
        Intent intent = new Intent(context, GccsTaskMenuActivity.class);
        intent.putExtra(intent_data, bean);
        context.startActivity(intent);
    }

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_gccs_task_menu);
        ImmersionBar.with(this).transparentBar().statusBarDarkFont(true).init();
        ButterKnife.bind(this);
        ll_root.setPadding(0, ImmersionBar.getStatusBarHeight(this), 0, 0);
        applyGccsTask = (ApplyGccsTask) getIntent().getSerializableExtra(intent_data);
        iv_back.setOnClickListener(new OnNoDoubleClickListener() {
            @Override
            protected void onNoDoubleClick(View v) {
                finish();
            }
        });
        ll_gccs.setOnClickListener(new OnNoDoubleClickListener() {
            @Override
            protected void onNoDoubleClick(View v) {
                Intent intent = new Intent(context, GccsUserTaskMapActivity.class);
                intent.putExtra(GccsUserTaskMapActivity.intent_data, applyGccsTask);
                startActivity(intent);
            }
        });
        ll_xmsj.setOnClickListener(new OnNoDoubleClickListener() {
            @Override
            protected void onNoDoubleClick(View v) {
                Intent intent = new Intent(context, GccsXmsjFormActivity.class);
                intent.putExtra(GccsXmsjFormActivity.intent_data, applyGccsTask);
                startActivity(intent);
            }
        });
        ll_zjbf.setOnClickListener(new OnNoDoubleClickListener() {
            @Override
            protected void onNoDoubleClick(View v) {
                Intent intent = new Intent(context, GccsZjbfFormActivity.class);
                intent.putExtra(GccsZjbfFormActivity.intent_data, applyGccsTask);
                startActivity(intent);
            }
        });
        ll_ssgh.setOnClickListener(new OnNoDoubleClickListener() {
            @Override
            protected void onNoDoubleClick(View v) {
                Intent intent = new Intent(context, GccsSbghFormActivity.class);
                intent.putExtra(GccsSbghFormActivity.intent_data, applyGccsTask);
                startActivity(intent);
            }
        });
    }
}
